package com.im.entity.vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.hibernate.validator.constraints.Length;


@Data
@Schema(description = "群信息VO")
@AllArgsConstructor
public class GroupVO {

    @Schema(description = "群id")
    private Long groupId;

    @Length(max = 20, message = "群名称长度不能大于20")
    @NotEmpty(message = "群名称不可为空")
    @Schema(description = "群名称")
    private String name;

    @Schema(description = "群主id")
    private Long ownerId;

    @Schema(description = "群头像")
    private String avatar;

    public GroupVO(Long groupId, String name,  String avatar) {
        this.groupId = groupId;
        this.name = name;
        this.avatar = avatar;
    }
}